﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GuestManage.aspx.cs" Inherits="Guest_GuestManage" %>
<%@ Register Src="../usercontrol/PageNavigator.ascx" TagName="PageNavigator" TagPrefix="uc1" %>
<html>
<head id="Head1" runat="server">
    <title>无标题页</title>
    <link href="../css/adminCss.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../js/changerows.js"></script>
    <script type="text/javascript">
    function CheckAll(form) {
	    for (var i=0;i<form.elements.length;i++) {
		    var e = form.elements[i];
		    if (e.name != 'chkall' && e.type=='checkbox')
			    e.checked = form.chkall.checked;
	    }
    }
    
    </script>

</head>
<body>
    <form id="form1" runat="server">
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="31" style="height: 25px">
                    <img src="../images/module.gif" width="20" height="22"></td>
                <td style="width: 232px; height: 25px;">
                    <asp:Label ID="lblPath" runat="server"></asp:Label></td>
                <td width="990" align="right" style="height: 25px">
                    <img src="../images/search.gif" alt="搜索" width="16" height="16" />名称：<asp:TextBox
                        ID="txtContent" runat="server" CssClass="input1" Width="100px"/>单号：<asp:TextBox
                        ID="TxtSalesCode" runat="server" CssClass="input1" Width="100px"/>
                    <asp:Button ID="btnSearch" runat="server" Text=" 搜 索 " CssClass="submit" OnClick="btnSearch_Click"  /></td>
            </tr>
        </table>
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td bgcolor="#3CB6E5" height="5px">
                </td>
            </tr>
        </table>
        <asp:GridView ID="GvData" runat="server" Width="99%" AutoGenerateColumns="False" CssClass="gridview" OnRowDataBound="GvData_RowDataBound" EmptyDataText="没有数据">
              <RowStyle Height="25px" />
            <PagerSettings Visible="False" />
            <Columns>
                <asp:BoundField HeaderText="客户ID" DataField="GuestId" ></asp:BoundField>
                <asp:BoundField HeaderText="客户名" DataField="GuestName" ></asp:BoundField>
                <asp:BoundField HeaderText="订单号" DataField="SalesCode" ></asp:BoundField>
                <asp:BoundField HeaderText="联系人" DataField="GuestMan" ></asp:BoundField>
                <asp:BoundField HeaderText="联系电话" DataField="Phone" ></asp:BoundField>
                <asp:BoundField HeaderText="客户地址" DataField="Address" ></asp:BoundField>
                <asp:BoundField HeaderText="备注描述" DataField="Content" ></asp:BoundField>
                <asp:BoundField HeaderText="编辑人" DataField="EditUserName" ></asp:BoundField>
                <asp:BoundField HeaderText="编辑时间" DataField="eidtdat"></asp:BoundField>
                <asp:BoundField HeaderText="审核状态" DataField="AuditState"><ItemStyle ForeColor="Red"/></asp:BoundField>
                <asp:TemplateField HeaderText="操作">
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkbtnEdit" CommandArgument='<%#Eval("GuestId") %>' runat="server" OnClick="linkbtnUodate_Click">修改</asp:LinkButton>
                        <asp:LinkButton ID="lnkbtnFlag" CommandArgument='<%#Eval("GuestId") %>' runat="server" OnClick="lnkbtnFlag_Click">审核</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                   <asp:TemplateField HeaderText="选择">
                    <ItemTemplate>
                        <asp:CheckBox ID="ckFlag" runat="server"  />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <RowStyle HorizontalAlign="Center" />
            <EmptyDataRowStyle ForeColor="Red" HorizontalAlign="Center" />
        </asp:GridView>
        <table width="99%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td align="center">
                  <uc1:PageNavigator ID="PageNavigator1" DataId="GvData" ShowType="Text" ConnectionString="connstr" PageSize="20" runat="server" />
                </td>
                <td   height="5" align="right" >
                    
                    <input type="checkbox" name="chkall" onclick="CheckAll(this.form)" value="on"/><font
                        color="#FF0000">全选</font>&nbsp;
                    <asp:Button ID="btnAdd" runat="server" Text="添加" CssClass="submit" CausesValidation="False"
                        OnClick="btnAdd_Click" />&nbsp;<asp:Button ID="btnFlag" runat="server" Text="批审" CssClass="submit" OnClick="btnFlag_Click" OnClientClick="return confirm('确定要审核吗?')" />
                    <asp:Button  ID="btnDel" runat="server" Text="删除" CssClass="submit" OnClick="btnDel_Click" OnClientClick="return confirm('确定要删除吗?')" />
              </td>
            </tr>
        </table>
    </form>
</body>
</html>
<script language="javascript"><!--
//senfe("表格名称","奇数行背景","偶数行背景","鼠标经过背景","点击后背景");
senfe("GvData","#ECF9FC","#FFFFFF","#D6F1F8");
--></script>